package demo;

import java.util.HashSet;
import java.util.Set;

public class java_05 {
	public static void main(String[] args) {
		int[] arr1={1,2,3,3};
		int[] arr2={1,2,3,4};
		removeint(arr1, arr2);
	}
	private static void removeint(int[] arr1, int[] arr2) {
		HashSet<Integer> set1 = new HashSet<>();
		for(int i:arr1){
			set1.add(i);
		}
		HashSet<Integer> set2 = new HashSet<>();
		for (int num : arr2) {
			set2.add(num);
		}
		HashSet<Integer> set3 = new HashSet<>(set1);
        set3.retainAll(set2);
        set1.removeAll(set3);
        set2.removeAll(set3);
        HashSet<Integer> set4 = new HashSet<>(set1);
        set4.addAll(set2);
        set4.stream().mapToInt(Integer::intValue).forEach(System.out::print);
	}
}